package com.lk.labsystem.utils;

import lombok.Data;

@Data
public class ResultOBJ {
    private Integer code;
    private String msg;
    private Object data;
    public ResultOBJ(Integer code){
        this.code = code;
    }
    public ResultOBJ(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
    public ResultOBJ(Integer code, String msg, Object data){
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static final ResultOBJ ADD_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.ADD_Success);
    public static final ResultOBJ ADD_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.ADD_Error);
    //
    public static final ResultOBJ UPDATE_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Update_Success);
    public static final ResultOBJ UPDATE_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Update_Error);
    //
    public static final ResultOBJ LOGIN_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Login_Success);
    public static final ResultOBJ LOGIN_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Login_Error);
    //
    public static final ResultOBJ DELETE_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Delete_Success);
    public static final ResultOBJ DELETE_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Delete_Error);
}
